/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Damian
 */
@Embeddable
public class OfferHourlyPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_OFFER_HOURLY")
    private int idOfferHourly;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_OFFER")
    private int idOffer;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_HOURLY")
    private int idHourly;

    public OfferHourlyPK() {
    }

    public OfferHourlyPK(int idOfferHourly, int idOffer, int idHourly) {
        this.idOfferHourly = idOfferHourly;
        this.idOffer = idOffer;
        this.idHourly = idHourly;
    }

    public int getIdOfferHourly() {
        return idOfferHourly;
    }

    public void setIdOfferHourly(int idOfferHourly) {
        this.idOfferHourly = idOfferHourly;
    }

    public int getIdOffer() {
        return idOffer;
    }

    public void setIdOffer(int idOffer) {
        this.idOffer = idOffer;
    }

    public int getIdHourly() {
        return idHourly;
    }

    public void setIdHourly(int idHourly) {
        this.idHourly = idHourly;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idOfferHourly;
        hash += (int) idOffer;
        hash += (int) idHourly;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof OfferHourlyPK)) {
            return false;
        }
        OfferHourlyPK other = (OfferHourlyPK) object;
        if (this.idOfferHourly != other.idOfferHourly) {
            return false;
        }
        if (this.idOffer != other.idOffer) {
            return false;
        }
        if (this.idHourly != other.idHourly) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidades.OfferHourlyPK[ idOfferHourly=" + idOfferHourly + ", idOffer=" + idOffer + ", idHourly=" + idHourly + " ]";
    }
    
}
